package org.ytor.core.sqlflow.dsl.dsqlfile.loader;

import org.ytor.core.sqlflow.dsl.dsqlfile.DsqlSegment;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;
import java.util.List;

/**
 * created by yangtong on 2025/8/7 17:39:00
 * <br/>
 * dsql文件加载器
 */
public interface DSQLoader {
    /**
     * 从输入流加载文件
     */
    List<DsqlSegment> load(InputStream inputStream) throws IOException;
    /**
     * 从File对象加载文件
     */
    List<DsqlSegment> load(File file) throws IOException;
    /**
     * 从Path对象加载文件
     */
    List<DsqlSegment> load(Path path) throws IOException;
    /**
     * 从类路径加载文件
     */
    List<DsqlSegment> load(String resourcePath) throws IOException;
}
